package com.sc.nft.controller;


import com.sc.nft.controller.request.IdRequest;
import com.sc.nft.service.DaoPropsReleasedConfigService;
import com.sc.nft.sup.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/daoPropsReleasedConfig")
@Api(tags = "道具奖励释放配置模块")
public class DaoPropsReleasedConfigController {

    private final DaoPropsReleasedConfigService daoPropsReleasedConfigService;

    @PostMapping("/getActivityRulesImageUrl")
    @ApiOperation("查询奖励规则")
    public Result<String> getActivityRulesImageUrl(@ApiParam(value = "daoId", required = true) @Valid @RequestBody IdRequest idRequest) {
        String activityRulesImageUrl = daoPropsReleasedConfigService.getActivityRulesImageUrl(idRequest.getId());
        return Result.success(activityRulesImageUrl);
    }
}
